<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.active{
				color:red;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<ul>
				<li v-for="(m,index) in movies"
				:class="{active:curIndex === index}"
				@click="curIndex=index"
				>
					{{m}}
				</li>
			</ul>
		</div>
	</body>
	<script src="js/vue.js"></script>
	<script>
		const app=new Vue({
			el:'#app',
			data:{
				message:'',
				movies:['海王','忍者','小王','大王'],
				curIndex:0
			}
		})

	</script>
</html>
